﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StockBalanceAdmin.aspx.cs" Inherits="Manageweb_Stock_StockBalanceAdmin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>查看会员结存</title>
     <link href="../images/css.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript">dateFormat='yyyy-mm-dd'</script>

    <script src="../../js/popcalendar.js" type="text/javascript"></script>

</head>
<body>
    <form id="form1" runat="server">
<div>
       <table id="TABLE_Add_Mod" border="1" cellpadding="0" cellspacing="0" width="850"
        style="margin: 0 auto">
        <tr>
            <td colspan="2" style="font-weight: bold; color: white; background-color: #507cd1;
                text-align: left">
                查看会员<span lang="zh-cn">结存</span>
            </td>
        </tr>
        <tr>
            <td style="width: 150px">
                &nbsp;<span lang="zh-cn"> </span>&nbsp;<span lang="zh-cn">会员</span>账号:
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtUserAccount" runat="server" Width="240px" Height="18px"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <span lang="zh-cn">&nbsp; 开始日期:</span>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtBeginDate" runat="server" Width="240px"></asp:TextBox>
                <img style="cursor: hand;" src="../../js/img/calendar.gif" onclick='popUpCalendar(this,  <%=txtBeginDate.ClientID %>, dateFormat,-1,-1)'
                    alt='Select'>
            </td>
        </tr>
        <tr>
            <td>
                <span lang="zh-cn">&nbsp;</span>&nbsp;<span lang="zh-cn">结束日期:</span>
            </td>
            <td style="text-align: left">
                <asp:TextBox ID="txtEndDate" runat="server" Width="240px"></asp:TextBox>
                <img style="cursor: hand;" src="../../js/img/calendar.gif" onclick='popUpCalendar(this,  <%=txtEndDate.ClientID %>, dateFormat,-1,-1)'
                    alt='Select'>
            </td>
        </tr>
        <tr>
            <td colspan="2" style="font-weight: bold; color: white; background-color: #507cd1">
                <asp:Button ID="Btn_Submit" runat="server" Text="查询" OnClick="Btn_Submit_Click" Style="width: 38px" />&nbsp;<asp:Button
                    ID="Btn_Cancel" runat="server" Text="取消" />
            </td>
        </tr>
    </table>
    <br />
    <table width="650px" style="margin: 0 auto">
        <tr>
            <td>
                <asp:GridView ID="GV_StockBalance" runat="server" AllowPaging="True" AllowSorting="True"
                    AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" Width="850px"
                    EmptyDataText="暂无转出记录" OnPageIndexChanging="GV_StockBalance_PageIndexChanging"
                    PageSize="20">
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:BoundField DataField="createtime" HeaderText="日期时间">
                            <ItemStyle Width="120px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="usercode" HeaderText="会员账号" />
                        <asp:BoundField DataField="holdday" HeaderText="持有日">
                            <ItemStyle Width="100px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="buycount" HeaderText="自购股票">
                            <ItemStyle HorizontalAlign="Right" Width="80px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="daigu" HeaderText="待估股份" />
                        <asp:BoundField DataField="salecount" HeaderText="出售股份" />
                        <asp:BoundField DataField="holdcount" HeaderText="股份余额" />
                        <asp:BoundField DataField="unitprice" HeaderText="购买金额" 
                            DataFormatString="{0:F2}" />
                        <asp:TemplateField HeaderText="成本核算">                           
                            <ItemTemplate>
                            <asp:Label runat="server" ID="lblChengBen" Text=' <%#( Convert.ToDecimal(Eval("holdcount"))*Convert.ToDecimal(Eval("unitprice"))).ToString("F2") %>'></asp:Label>
                             
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="shijia" HeaderText="时价" DataFormatString="{0:F2}" />
                        <asp:TemplateField HeaderText="利润">                            
                            <ItemTemplate>
                             <asp:Label runat="server" ID="lblLiRun" text='<%#Convert.ToDecimal(Eval("shijia"))-( Convert.ToDecimal(Eval("unitprice"))* Convert.ToDecimal(Eval("holdcount"))) %>'></asp:Label>
                             
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </td>
        </tr>
    </table>
    </div>
    </form>
</body>
</html>
